import request from '@/utils/request'

export default {
  //添加、修改说说
  addOrEditTalk(talk) {
    return request({
      url: `/admin/talk`,
      method: 'post',
      data: talk
    })
  },
  //删除说说
  deleteTalk(id) {
    return request({
      url: `/admin/talk/${id}`,
      method: 'delete',
    })
  },
  //获取说说列表(后端)
  talkBackList(condition) {
    return request({
      url: `/admin/talks`,
      method: 'post',
      data: condition
    })
  },
  // 根据id获取说说(后台)
  getTalkBackById(id){
    return request({
      url: `/admin/talk/${id}`,
      method: 'get',
    })
  }
}